// 让便签可被拖动，但不能超出视口
var note = document.querySelector('.note');
var moveBar = document.querySelector('.move-bar');

moveBar.onmousedown = function (e) {
  var mouseStartDownX = e.clientX,
    mouseStartDownY = e.clientY;
  var noteStartLeft = note.offsetLeft,
    noteStartTop = note.offsetTop;
  console.log(mouseStartDownX, mouseStartDownY);
  console.log(noteStartLeft, noteStartTop);

  window.onmousemove = function (e) {
    console.log('鼠标移动');
  };

  window.onmouseup = function (e) {
    console.log('鼠标松开');
    window.onmousemove = null;
    window.onmouseup = null;
  };
};
